<html>
    <head>
        <title>
            Test Create User Service
        </title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    </head>
    <body>

<?php
require_once('../lib/nusoap/nusoap.php');
$client = new soapclient('http://127.0.0.1/SEEKEREST/UMS/service/UserProfileService.php?wsdl', true);
$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Call the SOAP method
$dateTime = date("Y-m-d h:i:s A");
$refId = rand(10,10000000);
$request = array();
$request['updateUserProfileRequestHeader'] = array( 'refId' => $refId, 'dateTime' => $dateTime);
$request['updateUserProfileRequestDetail'] = array( 'refId' => $refId
                                                    ,'dateTime' => $dateTime
                                                    ,'UserId'=>'yyyyy'
                                                    ,'GenderCode'=>'yyyyy'
                                                    ,'TitleCode'=>'yyyyy'
                                                    ,'FirstName'=>'yyyyy'
                                                    ,'MiddleName'=>'yyyyy'
                                                    ,'LastName'=>'yyyyy'
                                                    ,'Address1'=>'yyyyy'
                                                    ,'Address2'=>'yyyyy'
                                                    ,'Address3'=>'yyyyy'
                                                    ,'Street'=>'yyyyy'
                                                    ,'SubDistrictCode'=>'yyyyy'
                                                    ,'DistrictCode'=>'yyyyy'
                                                    ,'ProvinceCode'=>'yyyyy'
                                                    ,'PostCode'=>'yyyyy'
                                                    ,'Telephone'=>'yyyyy'
                                                    ,'MobilePhone'=>'yyyyy'
                                                    ,'UpdateBy'=>'yyyyy'
                                                  );

$result = $client->call('UserProfileOperation.updateUserProfile', array('updateUserProfileRequest' => $request));


// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
} else {
    // Check for errors
    $err = $client->getError();
    if ($err) {
        // Display the error
        echo '<h2>Error</h2><pre>' . $err . '</pre>';
    } else {
        // Display the result
        echo '<h2>Result</h2><pre>';
        print_r($result);
    echo '</pre>';
    }
}
?>

        
    </body>
</html>

